module neo.typescript.model {
	/**
	 *
	 * @author 
	 *
	 */
	export class Bean extends egret.EventDispatcher {
        public static get PROPERTY_CHANGE(): string {
            return "property_change";
        }

        private _properties: Object;
        
        public setProperty(propertyKey:string, newValue:any):void {
            if (this._properties[propertyKey] != newValue) {
                this._properties[propertyKey] = newValue;
                this.dispatchEventWith(Bean.PROPERTY_CHANGE,false,propertyKey);
            }
        }
        
        public getProperty(propertyKey:string):any {
            return this._properties[propertyKey];
        }

		public constructor() {
            super();
            
            this._properties = {};
		}
	}
}
